package youcaihuaoa.weetop.com.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.robot.base.model.CustomListItemBean
import com.robot.base.model.CustomProfileItemBean
import com.robot.base.utils.pic.ImageLoaderUtils
import youcaihuaoa.weetop.com.R

class MyApplyProfileAdapter : BaseQuickAdapter<CustomProfileItemBean, BaseViewHolder>(
    R.layout.app_item_apply_profile
) {
    override fun convert(holder: BaseViewHolder, item: CustomProfileItemBean) {
        holder.setText(R.id.tv_apply_title, item.title)
            .setText(R.id.item_tv_name, "${item.user_name} ${item.examine_time ?: ""}")
            .setText(
                R.id.item_tv_result, when (item.status) {
                    //-1驳回；0待审批；1审批通过
                    "-1" -> {
                        "驳回 ${item.examine_remark}"
                    }
                    "0" -> {
                        "待审批"
                    }
                    "1" -> {
                        "审批通过"
                    }
                    else -> {
                        ""
                    }
                }
            )
            .setGone(R.id.view_line, item.title == "完成")
            .setGone(R.id.ll_content, item.title == "完成")
    }
}